<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
</head>
<style>
    html,
    body {
        background-color: #fff;
    }

    .placeholder_div {
        background-color: #fbf9f9;
    }

    .main {
        padding: 1rem;
        background-color: #fff;
    }

    .item {
        width: 100%;
        /* height: 7.5rem; */
        box-shadow: 0 0.1rem 0.5rem 0.1rem #eee;
        margin-bottom: 1rem;
        border-radius: 1rem;

    }

    .item div {
        padding: 0.8rem;
        font-size: 0.6rem;
        color: #838383;
    }

    .item div .item_title {
        font-size: 0.7rem;
        color: #303030;
    }

    .item div .item_title span {
        margin-left: 1rem;
    }

    .item .symptom {
        font-size: 0.7rem;
        color: #303030;
        margin-top: 0.5rem;
    }

    .item .prescription {
        margin: 0.25rem 0 0.75rem 0;
    }

    /* .item .chat {
        float: right;
        color: #2E8EFF;
        width: 2.5rem;
        height: 1rem;
        background-color: #F2F2F2;
        font-size: 0.5rem;
        text-align: center;
        line-height: 1.1rem;
        border-radius: 0.2rem;
        margin-top: -0.9rem;
    } */

    .yianjia {
        width: 100%;
        height: 6rem;
        box-shadow: 0 0.1rem 0.5rem 0.1rem #eee;
        margin-bottom: 1rem;
        border-radius: 1rem;
    }

    .yianjia div {
        padding: 0.8rem;
        font-size: 0.6rem;
        color: #838383;
    }

    .yianjia div .item_title span {
        margin-left: 1rem;
    }

    .yianjia .symptom {
        font-size: 0.7rem;
        color: #303030;
    }

    .yianjia .prescription {
        margin: 0.25rem 0 0.75rem 0;
    }

    .new {
        width: 100%;
        height: 2.2rem;
        color: #fff;
        text-align: center;
        line-height: 2.2rem;
        font-size: 0.8rem;
        background-color: #FD6151;
        position: fixed;
        bottom: 0;
        left: 0;
    }
</style>

<body>
    <div  id="app" v-cloak>
        <div class="placeholder_div"></div>

        <div class="gerenyian main">

            <div class="item" v-for="item in yian_list">
                <div>
                    <p class="item_title">{{item.name}}
                        <span v-if="item.sex == 1">男</span>
                        <span v-else>女</span>
                        <span>{{item.age}}</span>
                    </p>
                    <!-- <p class="chat">发起沟通</p> -->
                    <p class="symptom">{{item.name}}</p>
                    <p class="prescription">{{item.remark}}</p>
                    <p class="time">{{item.createTime}}</p>
                </div>
            </div>
        </div>

    </div>
</body>

</html>
<script src="../script/set_root.js"></script>

<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/zepto.min.js"></script>
<script type="text/javascript" src="../script/hb.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript">
    apiready = function () {
        hb_ready();

        // 获取单个医案夹信息
        get_ajax("medicalfolder/view", {
            id: String(api.pageParam.id)
        }, function (res, err) {
            if (res.code == 200) {
                // alert(JSON.stringify(res))
                app.yian_list = res
            } else {
                toast("网络不通畅，请稍后再试！")
            }

            if (err) {
                alert("网络不通畅，请稍后再试！")
            }
        })

    }
    //使用vue对数据进行绑定
    var app = new Vue({
        el: '#app',
        data: {
            yian_list: [],
        },
        methods: {

        },

    })
</script>